package decorator;

/**
 * Created by 0171093 on 2018/2/8.
 * <p/>
 * 具体的装饰对象ConcreteDecorator
 */
public class WaterCar extends SuperCar {
    //这里就是新增的功能
    public void swim() {
        System.out.println("---水里游");
    }

    public WaterCar(ICar iCar) {
        super(iCar);
    }

    @Override
    public void move() {
        super.move();
        swim();//在原有移动的基础上，装饰了一个fly的功能
    }
}
